Skip to content

Add parameter to ExtModule for requirements#5174

Merged
trmckay merged 3 commits intochipsalliance:mainfrom
trmckay:extmodule-require
Feb 3, 2026
Merged

Add parameter to ExtModule for requirements#5174
trmckay merged 3 commits intochipsalliance:mainfrom
trmckay:extmodule-require

Conversation

@trmckay
Copy link
Contributor

@trmckay trmckay commented Jan 23, 2026

Adds an API for the requires keyword supported by CIRCT after llvm/circt#9496.


Contributor Checklist

  • Did you add Scaladoc to every public function/method?
  • Did you add at least one test demonstrating the PR?
  • Did you delete any extraneous printlns/debugging code?
  • Did you specify the type of improvement?
  • Did you add appropriate documentation in docs/src?
  • Did you request a desired merge strategy?
  • Did you add text to be included in the Release Notes for this change?

Type of Improvement

  • Feature (or new API)

Desired Merge Strategy

  • Squash: The PR will be squashed and merged (choose this if you have no preference).

Release Notes

  • Add a requirements parameter to ExtModule for tracking external build requirements.

Reviewer Checklist (only modified by reviewer)

  • Did you add the appropriate labels? (Select the most appropriate one based on the "Type of Improvement")
  • Did you mark the proper milestone (Bug fix: 3.6.x, 5.x, or 6.x depending on impact, API modification or big change: 7.0)?
  • Did you review?
  • Did you check whether all relevant Contributor checkboxes have been checked?
  • Did you do one of the following when ready to merge:
    • Squash: You/ the contributor Enable auto-merge (squash) and clean up the commit message.
    • Merge: Ensure that contributor has cleaned up their commit history, then merge with Create a merge commit.

@trmckay trmckay added the Feature New feature, will be included in release notes label Jan 23, 2026
@trmckay trmckay marked this pull request as draft January 24, 2026 00:01
@trmckay trmckay force-pushed the extmodule-require branch 2 times, most recently from 2359f0a to 85a7ae7 Compare January 24, 2026 01:30
@trmckay trmckay marked this pull request as ready for review January 24, 2026 01:49
Copy link
Contributor

@jackkoenig jackkoenig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM, I think we should wait until a firtool release with requires support (and bump) before merging. I want to do a Chisel release soon and might do so before firtool supports this.

@trmckay trmckay changed the base branch from main to ci/ci-circt-nightly January 27, 2026 18:37
@jackkoenig
Copy link
Contributor

@trmckay firtool has been bumped, maybe you can retarget this to main?

@trmckay trmckay changed the base branch from ci/ci-circt-nightly to main February 3, 2026 18:33
@trmckay trmckay requested a review from jackkoenig February 3, 2026 19:21
importedDefinition.proto.layers
importedDefinition.proto.layers,
// Imported Definitions necessarily don't have external requirements
Seq.empty
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They don't necessarily but they might right?

Copy link
Contributor Author

@trmckay trmckay Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, they might contain modules with external requirements. But the module body of the imported Definition cannot since it would be generated by Chisel rather than being an extmodule of arbitrary verilog.

You would want to look at the instance graph in the circuit of the imported definition to find external requirements of those modules (none of which would correspond directly to the imported definition itself).

When you did the same for the instance graph in the circuit to which you imported the definition, you would find that it depends on an extmodule for that definition.

Combining the two results, you have everything you need to compile the second circuit.

@trmckay trmckay merged commit 87b7f5d into chipsalliance:main Feb 3, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature New feature, will be included in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants